package cn.ctodb.wxmp.service.dto;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import java.util.Objects;

import cn.ctodb.wxmp.domain.enumeration.TokenType;

/**
 * A DTO for the Token entity.
 */
public class TokenDTO implements Serializable {

    private Long id;

    private String accessToken;

    private Long expiresIn;

    private Long time;

    private TokenType tokenType;


    private Long mpId;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getAccessToken() {
        return accessToken;
    }

    public void setAccessToken(String accessToken) {
        this.accessToken = accessToken;
    }
    public Long getExpiresIn() {
        return expiresIn;
    }

    public void setExpiresIn(Long expiresIn) {
        this.expiresIn = expiresIn;
    }
    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }
    public TokenType getTokenType() {
        return tokenType;
    }

    public void setTokenType(TokenType tokenType) {
        this.tokenType = tokenType;
    }

    public Long getMpId() {
        return mpId;
    }

    public void setMpId(Long mpId) {
        this.mpId = mpId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        TokenDTO tokenDTO = (TokenDTO) o;

        if ( ! Objects.equals(id, tokenDTO.id)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "TokenDTO{" +
            "id=" + id +
            ", accessToken='" + accessToken + "'" +
            ", expiresIn='" + expiresIn + "'" +
            ", time='" + time + "'" +
            ", tokenType='" + tokenType + "'" +
            '}';
    }
}
